//
// Created by Joey on 2019/12/14.
//
#include<iostream>
using namespace std;

int main() {
    short num1 = 10;
    cout << "size of num1: " << sizeof(num1) << endl;
    cout << "size of short: " << sizeof(short) << endl;

    int num2 = 10;
    cout << "size of num2: " << sizeof(num2) << endl;
    cout << "size of int: " << sizeof(int) << endl;

    long num3 = 10;
    cout << "size of num3: " << sizeof(num3) << endl;
    cout << "size of long: " << sizeof(long) << endl;

    long long num4 = 10;
    cout << "size of num4: " << sizeof(num4) << endl;
    cout << "size of long long: " << sizeof(long long) << endl;
}

// MAC平台输出
//size of num1: 2
//size of short: 2
//size of num2: 4
//size of int: 4
//size of num3: 8
//size of long: 8
//size of num4: 8
//size of long long: 8

// 整形长度
// short < int <= long <= long long
